package com.example.qxfw.ybzz.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.qx.YbzzForecastshuzhi;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("service")
public interface YbzzForecastshuzhiMapper extends BaseMapper<YbzzForecastshuzhi> {

    @Select("select StationID,  observTime, DryBulbTemp, MaxTemp, MinTemp, RelHumidity, Rain, WindV10Ms, WindD10Ms " +
            "from ybzz_forecastshuzhi where ${timespan} > ${param1} AND ${timespan} <= ${param2} and ForecastType=${forecastType} ")
    List<YbzzForecastshuzhi> selectList(String timespan,String param1, String param2, String forecastType);

    @Delete("delete from ybzz_forecastshuzhi where ${param} > ${param1} AND ${param} <= {param2} and ForecastType='{forecastType}'")
    Integer delete(String param,String param1,String param2,String forecastType);
}
